# coding=utf-8
import os;
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings")  # NoQA
import django;
django.setup()  # NoQA

from spider.models import *
import logging
logging.basicConfig(level=logging.INFO)

class CleanDataController():
    def clean_all_product_data(self):
        Product.objects.all().delete()
        # Product.objects.all().delete()
        # Inventory.objects.all().delete()
        # Size.objects.all().delete()
        # Color.objects.all().delete()
        # BoothImage.objects.all().delete()
        # DetailImage.objects.all().delete()
        # Product.objects.all().delete()
        logging.info('删除完成')

if __name__ == '__main__':
    clean_data_controller = CleanDataController()
    clean_data_controller.clean_all_product_data()